
import api from "./index";

const url = 'http://localhost:4000';

// 接口列表
const options = {
    url,

    // 接口13： 判断用户是否登录
    // http://localhost:4000/api/user/logged
    logged(data = {}) {//形参
        return api.post('/api/user/logged', data)
    },

    // 接口16：删除评论
    // http://127.0.0.1:4000/api/comment/comment_remove
    commentRemove(data = {}) {
        return api.get('/api/comment/comment_remove', data)
    },

    // 编辑用户信息
    // http://localhost:4000/api/user/updateUser
    updateUser(data = {}) {
        return api.post('/api/user/updateUser', data)
    },

    // 创建用户
    // http://localhost:4000/api/user/create
    createUser(data = {}) {
        return api.post('/api/user/create', data)
    },

    // 删除用户
    // http://localhost:4000/api/user/delete
    deleteUser(data = {}) {
        return api.post('/api/user/delete', data)
    },

    // 获取歌曲交互数据列表
    // http://localhost:4000/api/inter/song
    getSongList(data = {}) {
        return api.get('/api/inter/song', data)
    },

    // 获取歌手交互数据列表
    // http://localhost:4000/api/inter/artist
    getArtistList(data = {}) {
        return api.get('/api/inter/artist', data)
    },

    // 获取歌手交互数据列表(根据关注数从大到小排序)
    // http://localhost:4000/api/inter/artist/playCount
    getArtistPlayCount(data = {}) {
        return api.get('/api/inter/artistFollowCount', data)
    },

    // 获取歌曲交互数据列表(按播放次数)
    // http://localhost:4000/api/inter/playCount
    getplayCount(data = {}) {
        return api.get('/api/inter/playCount', data)
    },

    // 获取歌曲交互数据列表(按收藏次数)
    // http://localhost:4000/api/inter/favoriteCount
    getcollectCount(data = {}) {
        return api.get('/api/inter/favoriteCount', data)
    },

    // 获取歌曲交互数据列表(按分享次数)
    // http://localhost:4000/api/inter/shareCount
    getshareCount(data = {}) {
        return api.get('/api/inter/shareCount', data)
    },

    // 获取专辑交互数据列表
    // http://localhost:4000/api/inter/album
    getAlbumList(data = {}) {
        return api.get('/api/inter/album', data)
    },

    // 获取专辑交互数据列表（根据收藏数从大到小排序）
    // http://localhost:4000/api/inter/album/favoriteCount
    getAlbumFavoriteCount(data = {}) {
        return api.get('/api/inter/albumFavoriteCount', data)
    },


    // 获取社区数据列表
    getCommunityList(data = {}) {
        return api.get('/api/community/list', data)
    },

    // 删除社区动态
    // http://localhost:4000/api/community/delete
    removeCommunity(data = {}) {
        return api.post('/api/community/delete', data)
    },

    // 获取社区评论列表
    // http://localhost:4000/api/comment/list
    getCommunityComment(data = {}) {
        return api.get('/api/comment/list', data)
    },

    // 删除社区评论
    // http://localhost:4000/api/comment/delete
    removeCommunityComment(data = {}) {
        return api.post('/api/comment/delete', data)
    },

    // 用户总数
    // http://localhost:4000/api/user/count
    getUserCount(data = {}) {
        return api.get('/api/user/count', data)
    },

    // 社区动态数量
    // http://localhost:4000/api/community/count
    getCommunityCount(data = {}) {
        return api.get('/api/community/count', data)
    },

    // 评论数量
    // http://localhost:4000/api/comment/count
    getCommentCount(data = {}) {
        return api.get('/api/comment/count', data)
    },

    // 歌曲数量
    // http://localhost:4000/api/song/count
    getSongCount(data = {}) {
        return api.get('/api/songs/play-count', data)
    },

    // 当前星期周一到周日的社区动态数量
    // http://localhost:4000/api/community/weekCount
    getCommunityWeekCount(data = {}) {
        return api.get('/api/community/weekly-count', data)
    },

    // 获取用户的男女数量
    // http://localhost:4000/api/user/genderCount
    getUserGenderCount(data = {}) {
        return api.get('/api/user/genderCount', data)
    },

}
// 导入接口列表
export default options;
